#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
#import "FoursquareTip.h"
#import "FoursquareTipCollectionDelegate.h"

//  This Foursquare integration is possible thanks to the Foursquare API by
//  Eric Butler and associates.
//
//  Copyright (C) 2010 Eric Butler <eric@codebutler.com>

/**
 * A FoursquareTipCollection is an object representing a collection
 * of tips in the Foursquare system.
 *
 * Provides the functionality to perform necessary queries on the set of 
 * tips.
 *
 * Code used within this class and the supporting API was written by 
 * Eric Butler and other associates.
 *
 * The supporting API can be found in ./FourSquareAPI folder.
 *
 * @author      Eric Butler
 * @author      James Lin
 * @version     2.2.2 
 * @since       2.2.2
 */
@interface FoursquareTipCollection : NSObject {
	id<FoursquareTipCollectionDelegate> delegate;      // Delegate handling response
	NSMutableArray*                     tipCollection; // Collection of tipd
}

/**
 * Retrieve the shared instance of the Foursquare tip collection.
 *
 * @return  the shared instance of FoursquareTipCollection
 */
+ (FoursquareTipCollection*)sharedTipCollection;

/**
 * Get the number of tips in the collection.
 *
 * @return  the number of tips in the collection
 */
- (NSInteger)size;

/**
 * Get the list of tips.
 *
 * @return  the list of tips
 */
- (NSArray*)allTips;

/**
 * Retrieve a fresh set of nearby tip data.
 *
 * @param location     the user location
 * @param theDelegate  the delegate handling update notification
 * @param tipLimit     the maximum number of tips to find
 */
- (void)updateWithUserLocation:(CLLocation*)location 
				   andDelegate:(id<FoursquareTipCollectionDelegate>)theDelegate 
					  tipLimit:(NSUInteger)tipLimit;

@end
